Cisco Packet Tracer Extensions API 8.1.0
API for communication between Cisco Packet Tracer application and its extension applications and modules.
Public Member Functions | List of all members
CScriptModule Class Reference

CScriptModule access from itself. More...

Inheritance diagram for CScriptModule:
CepInstance

Public Member Functions

bool stop ()
 Stop Script Module. More...
 
QString getScriptCode (QString)
 Get Script Code based on script id. More...
 
QString getScript (QString)
 Get Script Code based on script id and processes translations on the code, if exists. More...
 
bool hasScript (QString)
 Check if the script exists using script id. More...
 
QString getInterfaceCode (QString)
 Get Interface Code based on Interface id.. More...
 
QString getInterface (QString)
 Get Interface Code based on Interface id and processes translations on the code, if exists. More...
 
bool hasInterface (QString)
 Check if the Interface exists using Interface id. More...
 
QString getScriptDataStore (QString)
 
bool shouldPromptExternalNetworkAccess ()
 This delegate determines if script module should prompt for external network access. More...
 
bool shouldPromptExternalServerOperation (QString, int)
 This delegate determines if script module should prompt for external server operation. More...
 
- Public Member Functions inherited from CepInstance
uuid getInstanceId ()
 Returns the UUID of this external process. More...
 
Cep getCep ()
 
bool addExclusivePublisher (string)
 Returns true if the exclusive publisher with the specified certificate was added successfully, otherwise false. More...
 
void clearExclusivePublishers ()
 Clears all exclusive publishers. More...
 
bool removeExclusivePublisher (string)
 Returns true if the exclusive publisher with the specified certificate was removed successfully, otherwise false. More...
 
void removeExclusivePublisherAt (int)
 Removes the exclusive publisher at the specified index. More...
 
int getExclusivePublisherCount ()
 Returns the number of exclusive publishers. More...
 
string getExclusivePublisherAt (int)
 Returns the exclusive publisher at the specified index. More...
 
bool hasExclusivePublisher (string)
 Returns true if the specified certificate is an exclusive publisher, otherwise false. More...
 
QString getCommandLineArg ()
 Returns the command line argument for this external process (ExApp or Script Module) when launching PT. More...
 
void messageReceived (string, uuid, QString)
 This event is emitted when this external process receives a message from a local external process. More...
 
void remoteMessageReceived (string, uuid, QString)
 This event is emitted when this external process receives a message from a remote external process. More...
 
void registeredFileOpened (QString)
 This event is emitted when PT GUI or OS opens a file that is registered to this external process. More...
 

Detailed Description

CScriptModule access from itself.

Member Function Documentation

◆ getInterface()

QString CScriptModule::getInterface ( QString  )

Get Interface Code based on Interface id and processes translations on the code, if exists.

Parameters
id,Interfaceid
Returns
QString, processed Interface code

◆ getInterfaceCode()

QString CScriptModule::getInterfaceCode ( QString  )

Get Interface Code based on Interface id..

Parameters
id,Interfaceid
Returns
QString, Interface code

◆ getScript()

QString CScriptModule::getScript ( QString  )

Get Script Code based on script id and processes translations on the code, if exists.

Parameters
id,scriptid
Returns
QString, processed Script code

◆ getScriptCode()

QString CScriptModule::getScriptCode ( QString  )

Get Script Code based on script id.

Parameters
id,scriptid
Returns
QString, Script code

◆ getScriptDataStore()

QString CScriptModule::getScriptDataStore ( QString  )

◆ hasInterface()

bool CScriptModule::hasInterface ( QString  )

Check if the Interface exists using Interface id.

Parameters
id,Interfaceid
Returns
bool, true if it exists and false otherwise

◆ hasScript()

bool CScriptModule::hasScript ( QString  )

Check if the script exists using script id.

Parameters
id,scriptid
Returns
bool, true if it exists and false otherwise

◆ shouldPromptExternalNetworkAccess()

bool CScriptModule::shouldPromptExternalNetworkAccess ( )

This delegate determines if script module should prompt for external network access.

Returns
bool, true if script module should prompt, otherwise false.

◆ shouldPromptExternalServerOperation()

bool CScriptModule::shouldPromptExternalServerOperation ( QString  ,
int   
)

This delegate determines if script module should prompt for external server operation.

Parameters
protocol,HTTPor TCP
port,theport to listen on
Returns
bool, true if script module should prompt, otherwise false.

◆ stop()

bool CScriptModule::stop ( )

Stop Script Module.

Returns
bool, true if it has been stopped and false if otherwise

The documentation for this class was generated from the following file: